#include "meshmanager.h"

MeshManager::MeshManager()
{
    QOpenMesh* origin = new QOpenMesh();

//    origin->LoadFromFile("C:\\Users\\Xiaosen\\Desktop\\male head.obj");
    origin->LoadFromFile("C:\\Users\\Xiaosen\\Desktop\\Meshes\\bunny\\reconstruction\\bun_zipper.ply");
    m_meshes[ORIGINAL] = origin;

    QOpenMesh* noised = new QOpenMesh(origin);
    noised->NormNoise(0,0.001);

    m_meshes[NOISED] = noised;
}

MeshManager::~MeshManager()
{
    for (int i=0;i<m_meshes.count();i++)
    {
        QMesh* theMesh = m_meshes.value(m_meshes.keys()[i]);
        delete theMesh;
    }
}
